package com.yin.function;

import java.util.function.Predicate;


/*
    断定型接口：有一个输入，返回值只能是布尔值
 */
public class Demo02 {
    public static void main(String[] args) {
        Predicate<String> predicate = new Predicate<String>() {
            @Override
            public boolean test(String s) {
                return s.isEmpty();
            }
        };

        Predicate<String> predicate1 = String::isEmpty;
        System.out.println(predicate1.and(predicate1).test("1"));
    }
}
